﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Otgruzka.ServicesClients;
using Common;
using BusinessLogic.Security;
using Otgruzka.Helpers;
using Common.Util;


namespace Otgruzka.WebForms
{
    public partial class DelayDeliveryInfo : System.Web.UI.Page
    {
        protected string delayDeliveryInfoText = "";

        protected void Page_Load(object sender, EventArgs e)
        {
            BingPromptMessages();
        }

        private void BingPromptMessages()
        {
            try
            {
                string[] messages = new PromptMessagesClient().GetPromptMessages(this.AppRelativeVirtualPath.Substring(this.AppRelativeVirtualPath.LastIndexOf("/") + 1)).ToArray();

                if (messages != null && messages.Count() > 0)
                {
                    this.PromptMessagesRepeater.DataSource = messages;
                    this.PromptMessagesRepeater.DataBind();
                    this.PromptMessagesRepeater.Visible = true;
                }
                else
                {
                    this.PromptMessagesRepeater.Visible = false;
                }
            }
            catch (Exception ex)
            {
            }
        }


    }
}